import fetch from '@/utils/fetch'

/**
 * 品牌
 */
export function apiBrandList () {
  return fetch({
    url: '/api/v1/dictionary/brand/all',
    method: 'get'
  })
}

/**
 * 型号
 */
export function apiModelList (listQuery) {
  return fetch({
    url: '/api/v1/dictionary/model/all',
    method: 'get',
    params: listQuery
  })
}

/**
 * 客户类型
 */
export function apiCustomerTypeList () {
  return fetch({
    url: '/api/v1/dictionary/customerType/all',
    method: 'get'
  })
}

/**
 * 部门
 */
export function apiDepartmentList () {
  return fetch({
    url: '/api/v1/dictionary/department/all',
    method: 'get'
  })
}

/**
 * 岗位
 */
export function apiPositionList () {
  return fetch({
    url: '/api/v1/dictionary/position/all',
    method: 'get'
  })
}

/**
 * 客户工种列表
 */
export function apiCustomerProfessionTypeList () {
  return fetch({
    url: '/api/v1/dictionary/profession',
    method: 'get'
  })
}

export const roleType = [
  {
    value: 1,
    label: '总部'
  },
  {
    value: 2,
    label: '办事处'
  },
  {
    value: 3,
    label: '外包'
  },
  {
    value: 4,
    label: '工厂'
  },
  {
    value: 5,
    label: '维修点'
  }
]
